<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/2/15
  Time: 13:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
</head>
<body>
<table class="table table-condensed">
    <tr>
        <th>ID</th>
        <th>账户名</th>
        <th>余额</th>
    </tr>
    <c:forEach var="account" items="${pageInfo.list}">
        <tr>
            <td>${account.id}</td>
            <td>${account.name}</td>
            <td>${account.balance}</td>
        </tr>
    </c:forEach>
</table>
<nav aria-label="Page navigation">
    <ul class="pagination">
        <li>
            <a href="getAccountList?pageNum=1&pageSize=5" aria-label="Previous">
                <span aria-hidden="true">首页</span>
            </a>
        </li>
        <li>
            <c:if test="${not pageInfo.isFirstPage}">
                <a href="getAccountList?pageNum=${pageInfo.pageNum-1}&pageSize=5" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </c:if>
        </li>
        <li>
            <c:if test="${not pageInfo.isLastPage}">
                <a href="getAccountList?pageNum=${pageInfo.pageNum+1}&pageSize=5" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </c:if>
        </li>
        <li>
            <a href="getAccountList?pageNum=${pageInfo.pages}&pageSize=5" aria-label="Previous">
                <span aria-hidden="true">尾页</span>
            </a>
        </li>
        <li>
            <span>总共${pageInfo.total}条数据</span>
        </li>
        <li>
            <span>每页${pageInfo.pageSize}条数据</span>
        </li>
        <li>
            <span>${pageInfo.pageNum}/${pageInfo.pages}</span>
        </li>
    </ul>
</nav>
</body>
</html>
